// *****************************************************************************************
//
// Copyright (c) 2012. Lin Gui, Ocean University of China and Carneggie Mellon University.
// This code may be used, distribute, or modified only for research purposes or under
// license from Ocean University of China or Carnegie Mellon University. This notice must
//  be retained in all copies.
//
// *****************************************************************************************

/*!
  \file         fullscrstructedlight.h
  \author       Lin Gui
  \version      1.0
  \date         2012/1/4
  \brief        Header file for fullscreen structed light widget
*/

#ifndef FULLSCRSTRUCTEDLIGHT_H
#define FULLSCRSTRUCTEDLIGHT_H

#define DEBUG

#include <QWidget>
#include <QKeyEvent>
#include <QPaintEvent>

class FullscrStructedLight : public QWidget
{
Q_OBJECT
public:
    FullscrStructedLight(QWidget *parent = 0);
    ~FullscrStructedLight();

    enum LightStyle{
      VSTRIP,
      HSTRIP
    };
    void setColorList(QList <QColor> * newColorList);
    void setWidthList(QList <int> * newWidthList);
    void setSLightStye(LightStyle styleIndex);
    void endThis();

private:
    int myWidth;
    int myHeight;
    LightStyle sLightStyle;

    QList <QColor> * colorList;
    QList <int> * widthList;

protected:
    void keyPressEvent(QKeyEvent *keyEvent);
    void paintEvent(QPaintEvent *pEvent);
    void drawHStrips();
    void drawVStrips();
};

#endif // FULLSCRSTRUCTEDLIGHT_H
